package itcast.annotation.reflect;

import itcast.annotation.domain.Person;
import itcast.annotation.domain.Student;

import static java.lang.System.*;

/**
 * @author admin
 */
public class ReflectDemo {

    public static void main(String[] args) throws Exception {

        Class<?> cls1 = Class.forName("cn.itcast.domain.Person");
        out.println(cls1);
        Class<Person> cls2 = Person.class;
        out.println(cls2);
        Person p = new Person();
        Class<? extends Person> cls3 = p.getClass();
        out.println(cls3);

        out.println(cls1 == cls2);
        out.println(cls1 == cls3);


        Class<Student> c = Student.class;
        out.println(c == cls1);


    }
}
